package com.xzy.mapper;

import com.xzy.custom.Page;
import com.xzy.entities.BorrowRecord;
import com.xzy.web.form.BorrowRecordForm;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * TODO70
 *
 * @author Administrator
 * ClassName: BorrowRecordMapper
 * date: 2021/11/23 14:44
 */
@Repository
public interface BorrowRecordMapper {

    List<BorrowRecord> findAll();

    Integer findBorrowCount(@Param("page") Page page,@Param("name") String name);

    List<BorrowRecord> findAllBorrow(@Param("page")Page page,@Param("name") String name);

    void insertBorrowRecord(@Param("form") BorrowRecordForm form);

    List<Integer> findByUserId(@Param("userId") Integer userId);

    void insertOperation(@Param("form") BorrowRecordForm form);

    void updateStatus(@Param("borrowId") Integer borrowId);

    List<BorrowRecord> findAllDeWeight();
}
